package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusHardwareUsesMapper;
import com.ruoyi.business.domain.BusHardwareUses;
import com.ruoyi.business.service.IBusHardwareUsesService;

/**
 * 硬件使用情况表Service业务层处理
 * 
 * @author asher
 * @date 2021-11-02
 */
@Service
public class BusHardwareUsesServiceImpl implements IBusHardwareUsesService 
{
    @Autowired
    private BusHardwareUsesMapper busHardwareUsesMapper;

    /**
     * 查询硬件使用情况表
     * 
     * @param recordId 硬件使用情况表主键
     * @return 硬件使用情况表
     */
    @Override
    public BusHardwareUses selectBusHardwareUsesByRecordId(Long recordId)
    {
        return busHardwareUsesMapper.selectBusHardwareUsesByRecordId(recordId);
    }

    /**
     * 查询硬件使用情况表列表
     * 
     * @param busHardwareUses 硬件使用情况表
     * @return 硬件使用情况表
     */
    @Override
    public List<BusHardwareUses> selectBusHardwareUsesList(BusHardwareUses busHardwareUses)
    {
        return busHardwareUsesMapper.selectBusHardwareUsesList(busHardwareUses);
    }

    /**
     * 新增硬件使用情况表
     * 
     * @param busHardwareUses 硬件使用情况表
     * @return 结果
     */
    @Override
    public int insertBusHardwareUses(BusHardwareUses busHardwareUses)
    {
        busHardwareUses.setCreateTime(DateUtils.getNowDate());
        return busHardwareUsesMapper.insertBusHardwareUses(busHardwareUses);
    }

    /**
     * 修改硬件使用情况表
     * 
     * @param busHardwareUses 硬件使用情况表
     * @return 结果
     */
    @Override
    public int updateBusHardwareUses(BusHardwareUses busHardwareUses)
    {
        busHardwareUses.setUpdateTime(DateUtils.getNowDate());
        return busHardwareUsesMapper.updateBusHardwareUses(busHardwareUses);
    }

    /**
     * 批量删除硬件使用情况表
     * 
     * @param recordIds 需要删除的硬件使用情况表主键
     * @return 结果
     */
    @Override
    public int deleteBusHardwareUsesByRecordIds(Long[] recordIds)
    {
        return busHardwareUsesMapper.deleteBusHardwareUsesByRecordIds(recordIds);
    }

    /**
     * 删除硬件使用情况表信息
     * 
     * @param recordId 硬件使用情况表主键
     * @return 结果
     */
    @Override
    public int deleteBusHardwareUsesByRecordId(Long recordId)
    {
        return busHardwareUsesMapper.deleteBusHardwareUsesByRecordId(recordId);
    }
}
